# 导包
from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

# 获取 浏览器对象
driver = webdriver.Chrome()

# 打开注册A.html
url = r"D:\python\python-selenium-learn\a02_元素定位方式\learn-files\注册A.html"
driver.get(url)

# 1. 使用css id选择器 定位用户名 输入admin
driver.find_element(By.CSS_SELECTOR, "#nav-searchform > div.nav-search-content > input").click()

# 暂停3秒
sleep(3)

# 退出浏览器驱动
driver.quit()